sysLib - Kontron KTGM45 platform system-dependent library
sysNvRamGet( ) - get the contents of non-volatile RAM
sysNvRamSet( ) - write to non-volatile RAM
sysLocalToBusAdrs( ) - convert a local address to a bus address
sysBusToLocalAdrs( ) - convert a bus address to a local address
sysBusIntAck( ) - acknowledge a bus interrupt
sysBusIntGen( ) - generate a bus interrupt
sysMailboxConnect( ) - connect a routine to the mailbox interrupt
sysMailboxEnable( ) - enable the mailbox interrupt
sysBusTas( ) - test and set a location across the bus
sysPciIvecToIrq( ) - get an IRQ(PIC or IOAPIC) number from vector address
sysPciPirqEnable( ) - enable or disbable PCI PIRQ direct handling
sysPciPirqShow( ) - show the PCI PIRQ[A-H] to IRQ[0-15] routing status
sysModel( ) - return the model name of the CPU board
sysBspRev( ) - return the BSP version and revision number
sysHwInit( ) - initialize the system hardware
sysHwInit2( ) - additional system configuration and initialization
sysPhysMemTop( ) - get the address of the top of physical memory
sysMemTop( ) - get the address of the top of VxWorks memory
sysToMonitor( ) - transfer control to the ROM monitor
sysIntInitPIC( ) - initialize the interrupt controller
apicIntrIntHelper( ) - initialize pointers to vxBus driver routines.
sysIntLock( ) - lock out all interrupts
sysIntUnlock( ) - unlock the PIC interrupts
sysIntDisablePIC( ) - disable a bus interrupt level
sysIntEnablePIC( ) - enable a bus interrupt level
sysIntEoiGet( ) - get EOI/BOI function and its parameter
sysIntLevel( ) - get an IRQ(PIC) or INTIN(APIC) number in service
sysProcNumGet( ) - get the processor number
sysProcNumSet( ) - set the processor number
sysDelay( ) - allow recovery time for port accesses
sysUsDelay( ) - delay specified number of microseconds
sysStrayInt( ) - Do nothing for stray interrupts.
sysMmuMapAdd( ) - insert a new MMU mapping
sysBootWait( ) - wait until necessary tasks starts
sysBootLineInit( ) - initialize boot line for Profile BootApp VIP
This library provides board-specific routines. The device configuration modules and device drivers included are:
i8253Timer.c - Intel 8253 timer driver
i8259Intr.c - Intel 8259 Programmable Interrupt Controller (PIC) library
ioApicIntr.c - Intel IO APIC/xAPIC driver
ioApicIntrShow.c - Intel IO APIC/xAPIC driver show routines
iPiix4Pci.c - low level initalization code for PCI ISA/IDE Xcelerator
loApicIntr.c - Intel Pentium[234] Local APIC/xAPIC driver
loApicIntrShow.c - Intel Local APIC/xAPIC driver show routines
loApicTimer.c - Intel Pentium2/3/4 Local APIC timer library
nullNvRam.c - null NVRAM library
nullVme.c - null VMEbus library
pccardLib.c - PC CARD enabler library
pccardShow.c - PC CARD show library
pciCfgStub.c - customizes pciConfigLib for the BSP
pciCfgIntStub.c - customizes pciIntLib for the BSP
pciConfigLib.c - PCI configuration space access support for PCI drivers
pciIntLib.c - PCI shared interrupt support
pciConfigShow.c - Show routines for PCI configuration library
sysDec21x40End.c - system configuration module for dec21x40End driver
sysEl3c509End.c - system configuratin module for elt3c509End driver
sysEl3c90xEnd.c - system configuration module for el3c90xEnd driver
sysFei82557End.c - system configuration module for fei82557End driver
sysGei82543End.c - system configuration module for gei82543End driver
sysLn97xEnd.c - system configuration module for ln97xEnd driver
sysNe2000End.c - system configuration module for ne2000End driver
sysUltraEnd.c - system configuration module for SMC Elite ultraEnd driver
sysWindML.c - WindML BSP support routines
sysLib.h
VxWorks Programmer's Guide: Configuration
sysNvRamGet( ) - get the contents of non-volatile RAM
STATUS sysNvRamGet
(
char *string, /* where to copy non-volatile RAM */
int strLen, /* maximum number of bytes to copy */
int offset /* byte offset into non-volatile RAM */
)
This routine copies the contents of non-volatile memory into a specified string. The string is terminated with an EOS.
This routine has no effect, since there is no non-volatile RAM.
ERROR, always.
Not Available
sysNvRamSet( ) - write to non-volatile RAM
STATUS sysNvRamSet
(
char *string, /* string to be copied into non-volatile RAM */
int strLen, /* maximum number of bytes to copy */
int offset /* byte offset into non-volatile RAM */
)
This routine copies a specified string into non-volatile RAM.
This routine has no effect, since there is no non-volatile RAM.
ERROR, always.
Not Available
sysLocalToBusAdrs( ) - convert a local address to a bus address
STATUS sysLocalToBusAdrs
(
int adrsSpace, /* bus address space in which busAdrs resides, */
/* use address modifier codes defined in vme.h, */
/* such as VME_AM_STD_SUP_DATA */
char *localAdrs, /* local address to convert */
char **pBusAdrs /* where to return bus address */
)
This routine gets the VMEbus address that accesses a specified local memory address.
This routine has no effect, since there is no VMEbus.
ERROR, always.
sysBusToLocalAdrs( ) - convert a bus address to a local address
STATUS sysBusToLocalAdrs
(
int adrsSpace, /* bus address space in which busAdrs resides, */
/* use address modifier codes defined in vme.h, */
/* such as VME_AM_STD_SUP_DATA */
char *busAdrs, /* bus address to convert */
char **pLocalAdrs /* where to return local address */
)
This routine gets the local address that accesses a specified VMEbus address.
This routine has no effect, since there is no VMEbus.
ERROR, always.
sysBusIntAck( ) - acknowledge a bus interrupt
int sysBusIntAck
(
int intLevel /* interrupt level to acknowledge */
)
This routine acknowledges a specified VMEbus interrupt level.
This routine has no effect, since there is no VMEbus.
NULL.
sysBusIntGen( ) - generate a bus interrupt
STATUS sysBusIntGen
(
int level, /* bus interrupt level to generate */
int vector /* interrupt vector to return (0-255) */
)
This routine generates a VMEbus interrupt for a specified level with a specified vector.
This routine has no effect, since there is no VMEbus.
ERROR, always.
sysMailboxConnect( ) - connect a routine to the mailbox interrupt
STATUS sysMailboxConnect
(
FUNCPTR routine, /* routine called at each mailbox interrupt */
int arg /* argument with which to call routine */
)
This routine specifies the interrupt service routine to be called at each mailbox interrupt.
This routine has no effect, since the hardware does not support mailbox interrupts.
ERROR, always.
sysMailboxEnable( ) - enable the mailbox interrupt
STATUS sysMailboxEnable
(
char *mailboxAdrs /* mailbox address */
)
This routine enables the mailbox interrupt.
This routine has no effect, since the hardware does not support mailbox interrupts.
ERROR, always.
sysBusTas( ) - test and set a location across the bus
BOOL sysBusTas
(
char *addr /* address to be tested and set */
)
This routine performs a test-and-set (TAS) instruction across the backplane.
This routine is equivalent to vxTas( ), since there is no VMEbus.
TRUE if the value had not been set but is now, or FALSE if the value was set already.
sysLib, vxTas( )
sysPciIvecToIrq( ) - get an IRQ(PIC or IOAPIC) number from vector address
int sysPciIvecToIrq
(
int vector /* vector address */
)
This routine gets an IRQ(PIC or IOAPIC) number from vector address. Assumptions are following:
- IRQ number is 0 - 15 in PIC or VIRTUAL_WIRE mode
- IRQ number is 0 - 23 in SYMMETRIC_IO mode
IRQ 0 - 15/23, or -1 if we failed to get it.
Not Available
sysPciPirqEnable( ) - enable or disbable PCI PIRQ direct handling
VOID sysPciPirqEnable
(
BOOL enable /* TRUE to enable, FALSE to disable */
)
This routine enables or disbales the PCI PIRQ direct handling.
N/A
Not Available
sysPciPirqShow( ) - show the PCI PIRQ[A-H] to IRQ[0-15] routing status
void sysPciPirqShow (void)
This routine shows the PCI PIRQ[A-H] to IRQ[0-15] routing status
N/A
Not Available
sysModel( ) - return the model name of the CPU board
char *sysModel (void)
This routine returns the model name of the CPU board.
A pointer to the string "PC 386, 486, PENTIUM or PENTIUM[234]".
Not Available
sysBspRev( ) - return the BSP version and revision number
char * sysBspRev (void)
This routine returns a pointer to a BSP version and revision number, for example, 1.1/0. BSP_REV is concatenated to BSP_VERSION and returned.
A pointer to the BSP version/revision string.
Not Available
sysHwInit( ) - initialize the system hardware
void sysHwInit (void)
This routine initializes various features of the i386/i486 board. It is called from usrInit( ) in usrConfig.c.
This routine should not be called directly by the user application.
N/A
Not Available
sysHwInit2( ) - additional system configuration and initialization
void sysHwInit2 (void)
This routine connects system interrupts and does any additional configuration necessary.
N/A
Not Available
sysPhysMemTop( ) - get the address of the top of physical memory
char * sysPhysMemTop (void)
This routine returns the address of the first missing byte of memory, which indicates the top of physical memory.
The address of the top of physical memory.
Not Available
sysMemTop( ) - get the address of the top of VxWorks memory
char * sysMemTop (void)
This routine returns a pointer to the first byte of memory not controlled or used by VxWorks.
The user can reserve memory space by defining the macro USER_RESERVED_MEM in config.h. This routine returns the address of the reserved memory area. The value of USER_RESERVED_MEM is in bytes.
The address of the top of VxWorks memory.
Not Available
sysToMonitor( ) - transfer control to the ROM monitor
STATUS sysToMonitor
(
int startType /* passed to ROM to tell it how to boot */
)
This routine transfers control to the ROM monitor. It is usually called only by reboot( ) -- which services ^X -- and by bus errors at interrupt level. However, in some circumstances, the user may wish to introduce a new startType to enable special boot ROM facilities.
Does not return.
Not Available
sysIntInitPIC( ) - initialize the interrupt controller
void sysIntInitPIC (void)
This routine initializes the interrupt controller. Maps APIC and HPET Memory space.
N/A
Not Available
apicIntrIntHelper( ) - initialize pointers to vxBus driver routines.
STATUS apicIntrIntHelper
(
VXB_DEVICE_ID pDev,
void * unused
)
This routine initializes pointers to vxBus driver routines up front, rather than calling into vxBus API...
Called from "sysPciPirqEnable" because we require intEnable/Disable early on during PCI initialization...
STATUS
Not Available
sysIntLock( ) - lock out all interrupts
VOID sysIntLock (void)
This routine saves the mask and locks out all interrupts.
Not Available
Not Available
sysIntUnlock( ) - unlock the PIC interrupts
VOID sysIntUnlock (void)
This routine restores the mask and unlocks the PIC interrupts
Not Available
Not Available
sysIntDisablePIC( ) - disable a bus interrupt level
STATUS sysIntDisablePIC
(
int irqNo /* IRQ(PIC) or INTIN(APIC) number to disable */
)
This routine disables a specified bus interrupt level.
OK, or ERROR if failed.
Not Available
sysIntEnablePIC( ) - enable a bus interrupt level
STATUS sysIntEnablePIC
(
int irqNo /* IRQ(PIC) or INTIN(APIC) number to enable */
)
This routine enables a specified bus interrupt level.
OK, or ERROR if failed.
Not Available
sysIntEoiGet( ) - get EOI/BOI function and its parameter
void sysIntEoiGet
(
VOIDFUNCPTR * vector, /* interrupt vector to attach to */
VOIDFUNCPTR * routineBoi, /* BOI function */
int * parameterBoi, /* a parameter of the BOI function */
VOIDFUNCPTR * routineEoi, /* EOI function */
int * parameterEoi /* a parameter of the EOI function */
)
This routine gets EOI function and its parameter for the interrupt controller. If returned EOI/BOI function is NULL, intHandlerCreateX86( ) replaces "call _routineBoi/Eoi" in intConnectCode[] with NOP instruction.
N/A
Not Available
sysIntLevel( ) - get an IRQ(PIC) or INTIN(APIC) number in service
int sysIntLevel
(
int arg /* parameter to get the stack pointer */
)
This routine gets an IRQ(PIC) or INTIN(APIC) number in service. We assume the following:
- this function is called in intEnt( )
- IRQ number of the interrupt is at intConnectCode [29]
0 - (sysInumTblNumEnt - 1), or sysInumTblNumEnt if we failed to get it.
Not Available
sysProcNumGet( ) - get the processor number
int sysProcNumGet (void)
This routine returns the processor number for the CPU board, which is set with sysProcNumSet( ).
The processor number for the CPU board.
Not Available
sysProcNumSet( ) - set the processor number
void sysProcNumSet
(
int procNum /* processor number */
)
Set the processor number for the CPU board. Processor numbers should be unique on a single backplane.
By convention, only Processor 0 should dual-port its memory.
N/A
Not Available
sysDelay( ) - allow recovery time for port accesses
void sysDelay (void)
This routine provides a brief delay used between accesses to the same serial port chip.
N/A
Not Available
sysUsDelay( ) - delay specified number of microseconds
void sysUsDelay
(
int uSec
)
This routine provides a brief delay used between accesses to the same serial port chip.
N/A
Not Available
sysStrayInt( ) - Do nothing for stray interrupts.
void sysStrayInt (void)
Do nothing for stray interrupts.
Not Available
Not Available
sysMmuMapAdd( ) - insert a new MMU mapping
STATUS sysMmuMapAdd
(
void * address, /* memory region base address */
UINT length, /* memory region length in bytes*/
UINT initialStateMask, /* PHYS_MEM_DESC state mask */
UINT initialState /* PHYS_MEM_DESC state */
)
This routine will create a new sysPhysMemDesc table entry for a memory region of specified length in bytes and with a specified base address. The initialStateMask and initialState parameters specify a PHYS_MEM_DESC type state mask and state for the memory region.
This routine must be used before the sysPhysMemDesc table is referenced for the purpose of initializing the MMU or processor address space (us. in usrMmuInit( )).
The length in bytes will be rounded up to a multiple of VM_PAGE_SIZE bytes if necessary.
The current implementation assumes a one-to-one mapping of physical to virtual addresses.
OK or ERROR depending on availability of free mappings.
Not Available
sysLib, vmLib
sysBootWait( ) - wait until necessary tasks starts
void sysBootWait (void)
This routine wait until necessary tasks required in bootrom starts before boot procedure starts
N/A
Not Available
sysBootLineInit( ) - initialize boot line for Profile BootApp VIP
void sysBootLineInit
(
void
)
none
N/A
Not Available